package org.lanqiao.music.web.controller;

import org.lanqiao.music.system.service.AlbumMusicService;
import org.lanqiao.music.system.vo.MusicVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/albums")
public class AlbumMusicController {
    @Autowired
    private AlbumMusicService albumMusicService;

    /*@GetMapping("/getAll")
    public List<Album> getAllAlbums() {
        return albumMusicService.queryByPage()
    }*/
    @GetMapping("/music/{albumId}")
    public List<MusicVO> getMusicDetailsByAlbumId(@PathVariable Integer albumId) {
        return albumMusicService.getMusicDetailsByAlbumId(albumId);
    }
}
